﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/UserTemplate.master" AutoEventWireup="true"
    CodeBehind="MyInvites.aspx.cs" Inherits="TeamBuy.AccessWebUI.Account.MyInvites" %>

<%@ Register Src="../Components/AccountPages/Main_InviteLink.ascx" TagName="Main_InviteLink"
    TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphUserHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphUser" runat="server">
    <div id="bdw" class="bdw">
        <div id="bd" class="cf">
            <div id="referrals">
                <div id="content" class="invites">
                    <div class="dashboard" id="dashboard">
                        <ul>
                            <li><a href="Coupon.aspx">我的美团券</a><span></span></li>
                            <li><a href="Order.aspx">我的订单</a><span></span></li>
                            <li class="current"><a href="MyInvites.aspx">我的邀请</a><span></span></li>
                            <li><a href="Point.aspx">我的积分</a><span></span></li>
                            <li><a href="Credit.aspx">账户余额</a><span></span></li>
                            <li><a href="Setting.aspx">账户设置</a><span></span></li>
                        </ul>
                    </div>
                    <div class="box clear">
                        <div class="box-top">
                        </div>
                        <div class="box-content">
                            <div class="head">
                                <h2>
                                    我的邀请</h2>
                                <ul class="filter">
                                    <li class="label">分类: </li>
                                    <li <asp:Literal ID="ltlAllStyle" Text="class='current'" runat="server"></asp:Literal>><asp:LinkButton 
                                            ID="lbtnAll" runat="server" onclick="lbtnAll_Click">所有</asp:LinkButton></li>
                                    <li <asp:Literal ID="ltlNotPaiedStyle" runat="server"></asp:Literal>><asp:LinkButton 
                                            ID="lbtnNotPaied" runat="server" onclick="lbtnNotPaied_Click">未购买</asp:LinkButton></li>
                                    <li <asp:Literal ID="ltlPaiedStyle" runat="server"></asp:Literal>><asp:LinkButton 
                                            ID="lbtnPaied" runat="server" onclick="lbtnPaied_Click">已返利</asp:LinkButton></li>
                                </ul>
                            </div>
                            <div class="sect">
                                <div class="share-list cf">
                                    <uc1:Main_InviteLink ID="Main_InviteLink1" runat="server" />
                                </div>
                                <table cellspacing="0" cellpadding="0" border="0" class="coupons-table">
                                    <tr>
                                        <th width="120">
                                            用户
                                        </th>
                                        <th width="300">
                                            邀请时间
                                        </th>
                                        <th width="180">
                                            状态
                                        </th>
                                    </tr>
                                    <asp:ListView ID="lvInvites" runat="server" DataSourceID="adsInvites">
                                        <ItemTemplate>
                                            <tr class="alt">
                                                <td>
                                                    <%#Eval("UserName") %>
                                                </td>
                                                <td>
                                                    <%#Convert.ToDateTime(Eval("DateUpdated")).ToString("yyyy年MM月dd日 hh:mm") %>
                                                </td>
                                                <td>
                                                    <%#Convert.ToBoolean(Eval("IsUserPaied")) == true ? "已返利" : "未购买" %>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <AlternatingItemTemplate>
                                            <tr>
                                                <td>
                                                    <%#Eval("UserName") %>
                                                </td>
                                                <td>
                                                    <%#Convert.ToDateTime(Eval("DateUpdated")).ToString("yyyy年MM月dd日 hh:mm") %>
                                                </td>
                                                <td>
                                                    <%#Convert.ToBoolean(Eval("IsUserPaied")) == true ? "已返利" : "未购买" %>
                                                </td>
                                            </tr>
                                        </AlternatingItemTemplate>
                                        <EmptyDataTemplate>
                                            <tr>
                                                <td colspan="3">
                                                    <strong>暂无邀请记录</strong>
                                                </td>
                                            </tr>
                                        </EmptyDataTemplate>
                                        <LayoutTemplate>
                                            <div id="itemPlaceholderContainer" runat="server" style="">
                                                <span id="itemPlaceholder" runat="server" />
                                            </div>
                                            <div style="">
                                            </div>
                                        </LayoutTemplate>
                                    </asp:ListView>
                                </table>
                                <asp:AccessDataSource ID="adsInvites" runat="server" DataFile="~/App_Data/TeamBuyData.mdb"
                                    
                                    SelectCommand="SELECT * FROM [vw_UserInvites] WHERE (([IsActived] = Yes) AND ([InvitedUserID] = ?))">
                                    <SelectParameters>
                                        <asp:SessionParameter DefaultValue="0" Name="InvitedUserID" 
                                            SessionField="UserID" Type="Int32" />
                                    </SelectParameters>
                                </asp:AccessDataSource>
                                <div class="paginator">
                                    <asp:DataPager ID="dpInvites" runat="server" PagedControlID="lvInvites" PageSize="10">
                                        <Fields>
                                            <asp:NextPreviousPagerField ShowFirstPageButton="True" ButtonCssClass="paginator_li paginator_li_a"
                                                ShowLastPageButton="false" ShowNextPageButton="False" FirstPageText="首页" NextPageText="下一页"
                                                PreviousPageText="上一页" />
                                            <asp:NumericPagerField CurrentPageLabelCssClass="paginator_li_current" NumericButtonCssClass="paginator_li paginator_li_a"
                                                ButtonCount="10" />
                                            <asp:NextPreviousPagerField ShowLastPageButton="false" ButtonCssClass="paginator_li paginator_li_a"
                                                ShowPreviousPageButton="False" NextPageText="下一页" PreviousPageText="上一页" />
                                        </Fields>
                                    </asp:DataPager>
                                </div>
                            </div>
                        </div>
                        <div class="box-bottom">
                        </div>
                    </div>
                </div>
                <div id="sidebar" style="padding-top: 34px;">
                    <div class="sbox">
                        <div class="sbox-top">
                        </div>
                        <div class="sbox-content">
                            <div class="side-tip referrals-side">
                                <h3 class="first">
                                    不同的状态都是什么意思？</h3>
                                <ul class="invalid">
                                    <li>未购买：您已邀请好友注册，但是好友尚未参加过团购</li>
                                    <li>已返利：恭喜，已经给您返利 10 元啦</li>
                                    <li>待返利：好友已团购，将会在 24 小时内返利，请稍候</li>
                                    <li>审核未通过：因为手机号重复等原因被判为无效邀请</li>
                                    <li>已过期：好友 7 天内未参加团购，邀请过期了</li>
                                </ul>
                                <h3>
                                    自己邀请自己也能获得返利吗？</h3>
                                <p>
                                    不可以。我们会人工核查，对于查实的作弊行为，不返利，标记为“审核未通过”。</p>
                            </div>
                        </div>
                        <div class="sbox-bottom">
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- bd end -->
    </div>
    <!-- bdw end -->
</asp:Content>
